<!DOCTYPE html>
<html lang="zh">
<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="keywords" content="">
    <meta name="description" content="">
    <title>Summernote富文本编辑器</title>
    <link rel="shortcut icon" href="../../web-frame/ruoyi/favicon.ico">
    <link href="../../web-frame/ruoyi/css/bootstrap.min.css" rel="stylesheet"/>
    <link href="../../web-frame/ruoyi/css/font-awesome.min.css" rel="stylesheet"/>
    <!-- bootstrap-table 表格插件样式 -->
    <link href="../../web-frame/ruoyi/libs/bootstrap-table/bootstrap-table.min.css?v=20201129" rel="stylesheet"/>
    <link href="../../web-frame/ruoyi/css/animate.css" rel="stylesheet"/>
    <link href="../../web-frame/ruoyi/css/style.css?v=20200903" rel="stylesheet"/>
    <link href="../../web-frame/ruoyi/ruoyi/css/ry-ui.css?v=4.6.0" rel="stylesheet"/>


    <link href="../../web-frame/ruoyi/libs/summernote/summernote.css" rel="stylesheet"/>
    <link href="../../web-frame/ruoyi/libs/summernote/summernote-bs3.css" rel="stylesheet"/>

</head>
<body class="gray-bg">
<div class="wrapper wrapper-content">

    <div class="col-sm-12 search-collapse">
        <form id="menu-form">
            <div class="select-list">
                <ul>
                    <li>
                        标题名称：<input id="title" type="text" name="menuName"/>
                    </li>
                    <li>
                        <div id="list-type"></div>
                    </li>
                    <li>
                        备注：<input id="note" type="text" name="menuName"/>
                    </li>
                </ul>
            </div>
        </form>
    </div>
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <h5>笔记内容添加</h5>
                </div>
                <div class="ibox-content no-padding">
                    <div class="summernote">

                    </div>
                </div>
            </div>
        </div>
    </div>
    <div>
        <a class="btn btn-primary" id="save-note"><i class="glyphicon glyphicon-ok"></i>&nbsp;保存</a>
    </div>
</div>

<script> var ctx = "\/"; var lockscreen = null; if(lockscreen){window.top.location=ctx+"lockscreen";} </script>
<a id="scroll-up" href="#" class="btn btn-sm display"><i class="fa fa-angle-double-up"></i></a>
<script src="../../web-frame/ruoyi/js/jquery.min.js"></script>
<script src="../../web-frame/ruoyi/js/bootstrap.min.js"></script>
<!-- bootstrap-table 表格插件 -->
<script src="../../web-frame/ruoyi/libs/bootstrap-table/bootstrap-table.min.js?v=20201129"></script>
<script src="../../web-frame/ruoyi/libs/bootstrap-table/locale/bootstrap-table-zh-CN.min.js?v=20201129"></script>
<script src="../../web-frame/ruoyi/libs/bootstrap-table/extensions/mobile/bootstrap-table-mobile.min.js?v=20201129"></script>
<!-- jquery-validate 表单验证插件 -->
<script src="../../web-frame/ruoyi/libs/validate/jquery.validate.min.js"></script>
<script src="../../web-frame/ruoyi/libs/validate/messages_zh.min.js"></script>
<script src="../../web-frame/ruoyi/libs/validate/jquery.validate.extend.js"></script>
<!-- jquery-validate 表单树插件 -->
<script src="../../web-frame/ruoyi/libs/bootstrap-treetable/bootstrap-treetable.js"></script>
<!-- 遮罩层 -->
<script src="../../web-frame/ruoyi/libs/blockUI/jquery.blockUI.js"></script>
<script src="../../web-frame/ruoyi/libs/iCheck/icheck.min.js"></script>
<script src="../../web-frame/ruoyi/libs/layer/layer.min.js"></script>
<script src="../../web-frame/ruoyi/libs/layui/layui.js"></script>
<script src="../../web-frame/ruoyi/ruoyi/js/common.js?v=4.6.0"></script>
<script src="../../web-frame/ruoyi/ruoyi/js/ry-ui.js?v=4.6.0"></script>


<script src="../../web-frame/ruoyi/libs/summernote/summernote.min.js"></script>
<script src="../../web-frame/ruoyi/libs/summernote/summernote-zh-CN.js"></script>

<script>
    $(document).ready(function () {
        $('.summernote').summernote({
            height: 200,
            lang: 'zh-CN'
        });
    });

    $("#save-note").click(function () {
        var title=$("#title").val();
        var typeid=$("#typelist").val();
        var content=$('.summernote').summernote('code')
        var note=$("#note").val();
        var data={'title':title,'typeid':typeid,'content':content,'note':note};
        var result=urldata('put','/note',data);
    })

    $(function(){
        var data=urldata('get','/notetype','')
        var str=' 菜单状态：<select id="typelist" name="visible">'
        str+='<option value="0">无</option>'
        for(var i= 0; i < data.data.length ; i++) {
            str+='<option value='+data.data[i].key+'>'+data.data[i].value+'</option>'
        }
        str+='</select>'
        $("#list-type").html(str)
    });



    function urldata(requestObject,url,data) {
        var data1='';
        $.ajax({
            type: requestObject,
            url: url,
            data:data,
            async:false,
            success: function(data) {
                data1=data;
            }
        })
        return data1
    }
</script>
</body>
</html>